package com.findlocation.persistence.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.findlocation.persistence.tech.dao.ObjetIdentifiable;


@Entity
@Table(name = "Annonce")
public class Annonce extends ObjetIdentifiable<Long> implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	private Long id;
	
	@ManyToOne
	@JoinColumn(name="ID", unique=true, nullable=false)
	private User propietaire;
	
	@OneToOne
	private Apartement apartement;
	
	@Column(name = "Annonce_prix")
	private Float prix;
	

	public Annonce() {
	}

	
	public Long getId() {
		return id;
	}


	public void setId(Long id) {
		this.id = id;
	}
	
	public User getPropietaire() {
		return propietaire;
	}

	public void setPropietaire(User propietaire) {
		this.propietaire = propietaire;
	}
	
	public Apartement getApartement() {
		return apartement;
	}


	public void setApartement(Apartement apartement) {
		this.apartement = apartement;
	}


	public Float getPrix() {
		return this.prix;
	}

	public void setPrix(Float prix) {
		this.prix = prix;
	}

}
